//Page Object
const app = getApp()

Page({
  data: {
    words: null
  },
  linkToDraw(e) {
    wx.navigateTo({
      url: '/pages/drawsth/drawsth?type=' + e.currentTarget.dataset.type
    });
  },
  clearRecord() {
    wx.showModal({
      title: '提示',
      content: '你确定清空答题记录吗？',
      success(res) {
        if (res.confirm) {
          app.globalData.word.resetTiku()
          wx.showToast({
            title: '重置成功！',
            icon: 'success'
          })
        }
      }
    })
  },
  onShareAppMessage() {
    return {
      title: '聚会娱乐必备游戏——"你比划我来猜"',
      path: '/pages/index/index'
    }
  },
  onLoad() {
  }
});